package cs343;

/**
* <p>
* Title: CS 343 Project: Pong
* </p>
* <p>
* Description: CS 343 Project  
* This class creates the paddle and keeps track of the position of the paddles
* </p>
* 
* @author Jenny Windsperger, Stirling Pankow, Will Prew, Shane O'Malley-Potting
* @email jennifer.windsperger@my.uwrf.edu, stirling.pankow@my.uwrf.edu,
*        william.prew@my.uwrf.edu, shane.omalley-potting@my.uwrf.edu
* @date December 1st 2011
*/

public class Paddle {

	private boolean side = false;
	private int paddleWidth;
	private int paddlePosition;
	private int paddleHeight;
	private boolean isCPUplayer = false;
	
	/**
	 * Alternate constructor
	 * Postcondition: paddleWidth = w; paddleHeight = h; position = pos
	 */
	public Paddle(int w, int h, int pos){
		paddleWidth = w;
		paddleHeight = h;
		paddlePosition = pos;
	}
	
	/**
	 * Method that is called to move the paddle
	 * Postcondition: position = position + distance
	 */
	public void move(int distance){
		paddlePosition += distance;
		
	}

	public boolean isSide() {
		return side;
	}

	public void setSide(boolean side) {
		this.side = side;
	}

	public int getPaddleWidth() {
		return paddleWidth;
	}

	public void setPaddleWidth(int paddleWidth) {
		this.paddleWidth = paddleWidth;
	}

	public int getPaddlePosition() {
		return paddlePosition;
	}

	public void setPaddlePosition(int paddlePosition) {
		this.paddlePosition = paddlePosition;
	}

	public int getPaddleHeight() {
		return paddleHeight;
	}

	public void setPaddleHeight(int paddleHeight) {
		this.paddleHeight = paddleHeight;
	}

	public boolean isCPUplayer() {
		return isCPUplayer;
	}

	public void setCPUplayer(boolean isCPUplayer) {
		this.isCPUplayer = isCPUplayer;
	}
	
}
